package org.dromara.crawler.service;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.DataFile;
import com.dtflys.forest.annotation.PostRequest;
import com.dtflys.forest.http.ForestRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author Shup
 * @date 2025/9/27 1:12
 */

@Component
@BaseRequest(baseURL = "http://js1.blockelite.cn:31765/")
public interface FileForwardClient {

    /**
     * 上传文件和文本数据，并构建动态 URL
     */
    @PostRequest("images_des/analyze")
    ForestRequest<Map> uploadByteArrayMap(@DataFile(value = "images", fileName = "${_key}") Map<String, byte[]> byteArrayMap, @Body("text") String text);

}
